import os

svninfo = os.popen('svn info').read()
print(svninfo)
ver_start = svninfo.find("Revision:")
ver_end = svninfo[ver_start:].find("\n")
Version = ""
if ver_start > 0 and ver_end > 0:
    Version = svninfo[ver_start + len("Revision:") + 1:ver_start + ver_end]
exe_name = 'version (' + Version + ')'
print(exe_name)
